Modern computer systems typically contain a memory device such as a dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double-data rate DRAM (DDR-DRAM), low power DDR-DRAM (LP DDR-DRAM) or other memory device which may be used to store data for the computer system. Typically, such devices include an array of memory cells (referred to as a memory array) which may be used to store data for the memory device. In some cases, a memory device may be manufactured which includes a defect in one or more of the cells of the memory array. Sometimes, such a defect may not be detected or become evident until after the memory device has been provided to a user.
Some memory devices include circuitry to detect, and correct the results of errors arising from a defect. For example, in order to detect and correct an error, the memory device may store error correction information which describes what data stored in the memory array should be. If data retrieved from the memory array does not match the description provided by the error correction information, then the error may be successfully detected. Also, in some cases, the error correction information may be used to correct the error by providing enough description to change the incorrect data resulting from the error to make the data correct. In order to provide a description of the correct data, the error correction information may be originally generated from the data when the data is presumed to be correct (e.g., the error correction information may be generated from the data when the data is received from another device).
In order to provide error correction and detection for data stored in a memory array, the memory device typically provides storage space for the error correction information. Thus, increases in the amount of error correction information represent additional cost in the memory device. For example, to correct an error in a single bit (referred to as a single-bit error, or SBE) of an eight-bit data item (a byte), four bits of error correction information may be used. Because fours bits of error correction information may be used to correct a single bit error in eight bits of information, providing additional storage in the memory device for the error correction information represents a 50 percent overhead cost.
In some cases, the relative cost of providing error correction information may decrease as the number of bits being corrected increases. For example, to correct a single-bit error in a 32-bit data item (four bytes), only six bits of error correction information may be used, such that the overhead cost for the error correction information is only about 20 percent. Because the relative cost of providing error correction decreases as the amount of data being corrected increases, there may be a desire to group larger amounts of data together when providing error correction information for the grouped data.
As described above, error correction information may be generated from the group of data which is correctable using the error correction information. Thus, to provide error correction information for four bytes of data, all four bytes of data are usually used to generate the error correction information. In some cases, there may be a desire to modify only a single byte of the four bytes of data (e.g., by performing a single byte write to one byte of the four bytes of data). In this case, the modified single byte is presumably error-free at the time of being written to. However, the other three bytes in the group may already contain an error when the modified byte is written to. As a result, error correction information generated using the three unmodified bytes and the one modified byte may itself contain an error. Thus, where a single byte in the group of data is modified without first detecting the error in another byte in the group, error correction information generated from the group of data may be incorrect.
Accordingly, what is needed is an improved error correction method and apparatus.